#include<bits/stdc++.h>
using namespace std;
const int MAXN=1e5+10;
int hax[MAXN]={0};
priority_queue<int,vector<int>,greater<int> > q;
int cnt;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    cnt=n;
    for(int i=0;i<n;i++)
    {
        int a;
        cin>>a;
        hax[a]++;
        if(hax[a]==1) q.push(a);
    }
    //cout<<q.size()<<endl;
    int last=q.top();
    q.pop();
    while(!q.empty())
    {
        int now=q.top();
        q.pop();
        int tot=hax[now];
        while(hax[last]>0 && tot>0)
        {
            hax[last]--;
            tot--;
            cnt--;
        }
        last=now;
        //cout<<now<<' '<<cnt<<endl;
    }
    cout<<cnt<<endl;
    return 0;
}
